﻿using System;
using System.Collections.Generic;
using System.Text;

using System.Data;

namespace Slja.BLL
{

    public class PrjDesign
	{
        private readonly Slja.DAL.PrjDesign dal = new Slja.DAL.PrjDesign();
        /// <summary>
        /// 查PrjId是否已经存在
        /// </summary>
        /// <param name="PrjID"></param>
        /// <returns></returns>
        public bool Exist(string PrjID)
        {
           return dal.Exist(PrjID);
        }
        /// <summary>
        /// 取得项目列表
        /// </summary>
        /// <returns></returns>
        public DataTable GetPrjData(string strWhere)
        {
            return dal.GetPrjData(strWhere);
        }
        /// <summary>
        /// 增加一条数据,及其子表数据
        /// </summary>
        public int Add(Slja.Model.PrjMain model) {
            return dal.Add(model);
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(Slja.Model.PrjMain model)
        {
            dal.Update(model);
        }


        /// <summary>
        /// 删除一条数据，及子表所有相关数据
        /// </summary>
        public bool Delete(int ID)
        {
            return dal.Delete(ID);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool DeleteList(string IDlist) {
            return dal.DeleteList(IDlist);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Slja.Model.PrjMain GetModel(int ID)
        {
            return dal.GetModel(ID);
        }

    }
}
